package com.student.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * TeacherAppraisal entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Teacher_Appraisal", schema = "dbo", catalog = "StudentManager")
public class TeacherAppraisal implements java.io.Serializable {

	// Fields

	private Long teacherAppraisalId;
	private Student student;
	private Teacher teacher;
	private String appraisalResult;
	private Timestamp appraisalTime;

	// Constructors

	/** default constructor */
	public TeacherAppraisal() {
	}

	/** minimal constructor */
	public TeacherAppraisal(Long teacherAppraisalId, String appraisalResult) {
		this.teacherAppraisalId = teacherAppraisalId;
		this.appraisalResult = appraisalResult;
	}

	/** full constructor */
	public TeacherAppraisal(Long teacherAppraisalId, Student student,
			Teacher teacher, String appraisalResult, Timestamp appraisalTime) {
		this.teacherAppraisalId = teacherAppraisalId;
		this.student = student;
		this.teacher = teacher;
		this.appraisalResult = appraisalResult;
		this.appraisalTime = appraisalTime;
	}

	// Property accessors
	@Id
	@Column(name = "Teacher_Appraisal_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getTeacherAppraisalId() {
		return this.teacherAppraisalId;
	}

	public void setTeacherAppraisalId(Long teacherAppraisalId) {
		this.teacherAppraisalId = teacherAppraisalId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Student_id")
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Teacher_id")
	public Teacher getTeacher() {
		return this.teacher;
	}

	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}

	@Column(name = "Appraisal_Result", nullable = false, length = 256)
	public String getAppraisalResult() {
		return this.appraisalResult;
	}

	public void setAppraisalResult(String appraisalResult) {
		this.appraisalResult = appraisalResult;
	}

	@Column(name = "Appraisal_Time", length = 23)
	public Timestamp getAppraisalTime() {
		return this.appraisalTime;
	}

	public void setAppraisalTime(Timestamp appraisalTime) {
		this.appraisalTime = appraisalTime;
	}

}